import open3d as o3d

def visualize_pcd(pcd_path):
    # 读取 PCD 文件
    pcd = o3d.io.read_point_cloud(pcd_path)

    # 检查文件是否成功读取
    if pcd is None:
        print(f"Failed to read PCD file: {pcd_path}")
        return

    # 可视化点云
    o3d.visualization.draw_geometries([pcd])

if __name__ == "__main__":
    # 替换为你的 PCD 文件路径
    pcd_path = "/home/adt/Downloads/标定软件-吴浪/明月湖交付物-吴浪/3D_circle_center_detection/data_RL/data_lidar/test_cloud_1.pcd"
    visualize_pcd(pcd_path)
